package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.PO.DeviceEntranceAuthPO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *       物业系统用户门禁设备权限数据访问接口
 * </desc>
 *
 * @createDate 2017/10/11
 */
@Mapper
@Repository
public interface IPropertyDeviceEntranceAuthDao extends IAbstractBaseDao<DeviceEntranceAuthPO>{
    /**
     * <desc>
     *      获取用户门禁设备权限
     * </desc>
     * @param params
     * @return List<DeviceEntranceAuthPO> 用户门禁权限实体对象集
     * @author zhangs
     * @createDate 2017/10/11
     */
    List<DeviceEntranceAuthPO> getUserDeviceEntranceAuth(Map<String, Object> params);

    /**
     * <desc>
     *      更新用户门禁设备权限
     * </desc>
     * @param deviceEntranceAuthPO
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer update(DeviceEntranceAuthPO deviceEntranceAuthPO);

    /**
     * <desc>
     *      更新用户门禁设备权限
     * </desc>
     * @param deviceEntranceAuthPO
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer updateById(DeviceEntranceAuthPO deviceEntranceAuthPO);

    /**
     * <desc>
     *      保存用户门禁设备权限
     * </desc>
     * @param params
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      删除用户电梯设备权限
     * </desc>
     * @param id 删掉的数据的Id
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer deleteById(String id);


    /**
     * <desc>
     *      获取权限记录id
     * <desc/>
     *
     * @param params
     * @return
     * @author Chunjian.G
     * @createDate 2017-12-27
     */
    List<Integer> getUserDeviceEntranceAuthId(Map<String, Object> params);
}
